package com.group4.datafactorybackend.controller;

import com.group4.datafactorybackend.common.R;
import com.group4.datafactorybackend.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 卑微小峰
 */
@Api(tags = "菜单管理")
@RestController
@RequestMapping("menu")
public class MenuController {

    private final MenuService menuService;

    @Autowired
    private MenuController(MenuService menuService) {
        this.menuService = menuService;
    }

    /**
     * @author 卑微小峰
     * @return R
     * @description 获取菜单列表
     */
    @ApiOperation("菜单列表")
    @GetMapping("/get/listMenu")
    public R<?> listMenu() {
        return menuService.listMenu();
    }
}
